package com.archermind.style.pojo;

import com.archermind.style.bean.DictColor;
import com.archermind.style.bean.DictFont;
import com.archermind.style.bean.DictFontSize;
import org.apache.commons.lang3.StringUtils;

public class RuleText {
    private Integer id;
    private Integer instanceId;
    private Integer styleTypeId;//styleType 表，自身属性
    private String scale; // 以,分隔的

    private Integer fontName ;//font-name="FONT_STYLE_CHN"
    private Integer fontSize ;// font-size="8"
    private Integer fontColor;// font-color="#724200"
    private String fontWeight;// font-weight="normal"
    private String fontStyle;// font-style="halo"
    private Integer halosize ;// halosize="0"
    private Integer bgsize;// bgsize="0"
    private Integer halocolor;// halocolor="#ffffffb3"
    private Integer density;// density="0"
    private Float fillarc;// fillarc="1.5"
    private TextTypeEnum texttype;//texttype="LineTextSymbolizer"

    private DictFont dictFontName;
    private DictFontSize dictFontSize;
    private DictColor dictFontColor;
    private DictColor dictHalocolor;

    public int testField() {
        if (fontName == null && fontSize == null && fontColor == null && StringUtils.isEmpty(fontWeight) && StringUtils.isEmpty(fontStyle) && halosize == null && bgsize == null && halocolor == null && density == null && fillarc == null) {
            return 0;
        } else if (fontName != null && fontSize != null && fontColor != null && StringUtils.isNotEmpty(fontWeight) && StringUtils.isNotEmpty(fontStyle) && halosize != null && bgsize != null && halocolor != null && density != null && fillarc != null) {
            return 1;
        } else {
            return -1;
        }
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getInstanceId() {
        return instanceId;
    }

    public void setInstanceId(Integer instanceId) {
        this.instanceId = instanceId;
    }

    public Integer getStyleTypeId() {
        return styleTypeId;
    }

    public void setStyleTypeId(Integer styleTypeId) {
        this.styleTypeId = styleTypeId;
    }


    public String getScale() {
        return scale;
    }

    public void setScale(String scale) {
        this.scale = scale;
    }

    public Integer getFontName() {
        return fontName;
    }

    public void setFontName(Integer fontName) {
        this.fontName = fontName;
    }

    public Integer getFontSize() {
        return fontSize;
    }

    public void setFontSize(Integer fontSize) {
        this.fontSize = fontSize;
    }

    public Integer getFontColor() {
        return fontColor;
    }

    public void setFontColor(Integer fontColor) {
        this.fontColor = fontColor;
    }

    public String getFontWeight() {
        return fontWeight;
    }

    public void setFontWeight(String fontWeight) {
        this.fontWeight = fontWeight;
    }

    public String getFontStyle() {
        return fontStyle;
    }

    public void setFontStyle(String fontStyle) {
        this.fontStyle = fontStyle;
    }

    public Integer getHalosize() {
        return halosize;
    }

    public void setHalosize(Integer halosize) {
        this.halosize = halosize;
    }

    public Integer getBgsize() {
        return bgsize;
    }

    public void setBgsize(Integer bgsize) {
        this.bgsize = bgsize;
    }

    public Integer getHalocolor() {
        return halocolor;
    }

    public void setHalocolor(Integer halocolor) {
        this.halocolor = halocolor;
    }

    public Integer getDensity() {
        return density;
    }

    public void setDensity(Integer density) {
        this.density = density;
    }

    public Float getFillarc() {
        return fillarc;
    }

    public void setFillarc(Float fillarc) {
        this.fillarc = fillarc;
    }

    public TextTypeEnum getTexttype() {
        return texttype;
    }

    public void setTexttype(TextTypeEnum texttype) {
        this.texttype = texttype;
    }

    public DictFont getDictFontName() {
        return dictFontName;
    }

    public void setDictFontName(DictFont dictFontName) {
        this.dictFontName = dictFontName;
    }

    public DictFontSize getDictFontSize() {
        return dictFontSize;
    }

    public void setDictFontSize(DictFontSize dictFontSize) {
        this.dictFontSize = dictFontSize;
    }

    public DictColor getDictFontColor() {
        return dictFontColor;
    }

    public void setDictFontColor(DictColor dictFontColor) {
        this.dictFontColor = dictFontColor;
    }

    public DictColor getDictHalocolor() {
        return dictHalocolor;
    }

    public void setDictHalocolor(DictColor dictHalocolor) {
        this.dictHalocolor = dictHalocolor;
    }
}
